Some examples would be Secondary Diabetes such as caused by an underlying medical condition such as cystic fibrosis, malignant neoplasm of pancreas, pancreatectomy, adverse effect of drug, or poisoning
Complications due to Insulin pump failure.
Patient that just happens to have diabetes but is being seeing for an unrelated condition where the fact they have diabetes plays a part on the physicians treatment decisions such treatment for a stubbed toe.
I grabbed most of these examples from the ICD Guidelines